#ifndef GRAPH
#define GRAPH
#include <vector>
#include "point.h"
#include "link.h"

class Graph{
	private:
		std::vector<Point*> points;
		std::vector<Link*> links;
		Point* getOutPoint(Link* link, Point* goal);
	public:
		Graph();
		~Graph();
		std::vector<Point*> getPoints();
        	Point* createPoint(Point* p);
        	Point* createPoint(int x, int y);
		void removePoint(Point* p);
        	Link* createLink(Point* p1, Point* p2);
		void removeLink(Link* l);
		std::vector<Link*> getLinks(Point* p=NULL);
		friend std::ostream & operator<<( std::ostream &, Graph);
		std::vector<Link*> astar(Point* start, Point* goal);
};

#endif
